package interlocking.model;

public class Signal {
    private final String id;
    private SignalAspect aspect;
    private boolean isRouteLocked;
    private int position_x;     //信号机的x坐标
    private int position_y;     //信号机的y坐标
    public Signal(String id,int position_x,int position_y) {
        this.id = id;
        this.aspect = SignalAspect.STOP;
        this.isRouteLocked = false;
        this.position_x=position_x;
        this.position_y=position_y;
    }

    public int getPosition_x(){
        return position_x;
    }

    public int getPosition_y(){
        return position_y;
    }
    // Getters and setters
    public SignalAspect getAspect() {
        return aspect;
    }

    public void setAspect(SignalAspect aspect) {
        this.aspect = aspect;
    }



    public boolean isRouteLocked() {
        return isRouteLocked;
    }

    public void setRouteLocked(boolean routeLocked) {
        isRouteLocked = routeLocked;
    }

    public String getId() {
        return id;
    }

    public enum SignalAspect {
        STOP, PROCEED, CAUTION
    }


}
